package com.exp.bookhouse.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

@ApiModel("系统日志实体类SysLog")
@TableName("tb_sys_log")
public class SysLog implements Serializable {

    @ApiModelProperty(value = "日志id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "访问时间",hidden = true)
    private Date visitTime;     //访问时间

    @ApiModelProperty(value = "访问者")
    private String loginUser;  //访问者

    @ApiModelProperty(value = "访问ip")
    private String ip;          //访问ip

    @ApiModelProperty(value = "访问资源url")
    private String url;         //访问资源url

    @ApiModelProperty(value = "执行时长")
    private Long executionTime;  //执行时长 单位：毫秒

    @ApiModelProperty(value = "访问方法")
    private String method;      //访问的方法

    public SysLog() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getVisitTime() {
        return visitTime;
    }

    public void setVisitTime(Date visitTime) {
        this.visitTime = visitTime;
    }

    public String getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(String loginUser) {
        this.loginUser = loginUser;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Long getExecutionTime() {
        return executionTime;
    }

    public void setExecutionTime(Long executionTime) {
        this.executionTime = executionTime;
    }

    @Override
    public String toString() {
        return "SysLog{" +
                "id=" + id +
                ", visitTime=" + visitTime +
                ", loginUser='" + loginUser + '\'' +
                ", ip='" + ip + '\'' +
                ", url='" + url + '\'' +
                ", executionTime=" + executionTime +
                ", method='" + method + '\'' +
                '}';
    }
}
